from django.urls import path
from . import views

app_name = 'admin_panel'

urlpatterns = [
    # 登录
    path('login/', views.AdminLoginView.as_view(), name='admin_login'),
    
    # 仪表盘
    path('', views.AdminDashboardView.as_view(), name='admin_dashboard'),
    
    # 旅行记录管理
    path('travel/', views.TravelRecordListView.as_view(), name='admin_travel_list'),
    path('travel/create/', views.TravelRecordCreateView.as_view(), name='admin_travel_create'),
    path('travel/<int:pk>/', views.TravelRecordDetailView.as_view(), name='admin_travel_detail'),
    path('travel/<int:pk>/edit/', views.TravelRecordUpdateView.as_view(), name='admin_travel_edit'),
    path('travel/<int:pk>/delete/', views.delete_travel_record, name='admin_travel_delete'),
    path('travel/bulk-delete/', views.bulk_delete_travel_records, name='admin_travel_bulk_delete'),
    
    # 用户管理
    path('users/', views.UserListView.as_view(), name='admin_user_list'),
    
    # 评论管理
    path('comments/', views.CommentListView.as_view(), name='admin_comment_list'),
    path('comments/<int:pk>/delete/', views.delete_comment, name='admin_comment_delete'),
    
    # 登出
    path('logout/', views.admin_logout, name='admin_logout'),
]
